<div class="top-action">
	<ul class="links">
		<li class="record-list"><a href="emails-list.php">List Email Templates</a></li>
	</ul>
</div>

<div class="form-wrap">
<form id="emails-edit-form" name="emails-edit-form" method="post" action="emails-edit.php" enctype="multipart/form-data">
	<table class="data-editor">

<!-- file or image upload script/patch -->
<!--{*
	<tr class="{cycle values='A,B'} waring-overwrite">
		<td class="attribute">emails File/Image:</td>
		<td>
			<input type="file" name="emailsfile" id="emailsfile" value="" />
			<a href="{$emails.emailsfile}" target="preview">View current</a>
		</td>
	</tr>
*}-->


	<tr class="{cycle values='A,B'}">
		<td class="attribute">Email Code: <span class="required">*</span></td>
		<td><strong>{$emails.email_code}</strong></td>
	</tr>

	<tr class="{cycle values='A,B'}">
		<td class="attribute">Email Subject: <span class="required">*</span></td>
		<td>
			<input type="text" name="emails[email_subject]" value="{$emails.email_subject|utf8}" class="input" id="emails-email_subject" />
			<span class="form-hints">Subject</span>		</td>
	</tr>

	<tr class="{cycle values='A,B'}">
		<td class="attribute">Email Comments: <span class="required">*</span></td>
		<td>
			<input type="text" name="emails[email_comments]" value="{$emails.email_comments|utf8}" class="input" id="emails-email_comments" />
			<span class="form-hints">Comments on this Email Template</span>		</td>
	</tr>

	<tr class="{cycle values='A,B'}">
		<td class="attribute">Email HTML: <span class="required">*</span></td>
		<td class="value">
			<div><textarea rows="5" cols="75" name="emails[email_html]" class="editor" id="emails-email_html">{$emails.email_html|utf8}</textarea></div>
			<p><span class="form-hints">HTML Text</span></p>		</td>
	</tr>

	<tr class="{cycle values='A,B'}">
		<td class="attribute">Email Text: <span class="required">*</span></td>
		<td class="value">
			<div><textarea rows="5" cols="75" name="emails[email_text]" class="text" id="emails-email_text">{$emails.email_text|utf8}</textarea></div>
			<p><span class="form-hints">Alternative Text</span></p>		</td>
	</tr>


    <tr>
      <td class="attribute">&nbsp;</td>
      <td>
		<input type="text" name="email" value="" class="vanish" />
		<input type="text" name="is_spam" value="" class="vanish" />
		<!--{* 100% sure, only spammers fill these fields, Leave blank. *}-->
		
		<input type="hidden" name="email_id" value="{$emails.email_id}" />
		
		<!-- This is different than system's protection code. This is related to particular ID. -->
		<input type="hidden" name="protection_code" value="{$emails.code}" />
		<input type="hidden" name="edit-action" value="Edit Email Templates" />
		<input type="submit" name="submit-button" class="submit" value="Save Changes" />
		<a href="{url::last_page('emails-list.php')}" class="button-cancel">Cancel</a>	  </td>
    </tr>
  </table>
</form>
</div>
<!-- End of administrators Edit -->

<!-- Validation -->
<script type="text/javascript" src="js/validator/gen_validatorv31.js"></script>
<script type="text/javascript" src="validators/emails/edit.js"></script>

<!-- Rich Editor: Remove if not necessary. Or, use different .js files -->
<script type="text/javascript" src="js/tinymce/tiny_mce.js"></script>
<script type="text/javascript" src="js/tinymce-textareas.js"></script>

<!-- End of emails Edit -->
